package com.zj.study.config;

import com.zj.study.annotation.BeanLog;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;

/**
 * @author 赵赳
 * @since 2021/8/6 9:17
 * @desc redis配置
 */
public class RedisListenerConfiguration {

  @Bean
  @BeanLog
  RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) {
    RedisMessageListenerContainer container = new RedisMessageListenerContainer();
    container.setConnectionFactory(connectionFactory);
    return container;
  }

}